package DishDemo;

public class Dish {
    //菜品名
    String name;
    //价格
    Double price;

    public Dish(String name, Double price) {
        this.name = name;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "菜品名：" + this.getName() + " 价格：" + this.getPrice();
    }
}
